import { createStore, combineReducers } from "redux";
// 引入 redux devtools
import { composeWithDevTools } from "@redux-devtools/extension";

// 引入子Reducer
import appReducer from "./reducers/app";
import userReducer from "./reducers/usre";

// 通过 composeReducers 来组装 rootReducer
const rootReducer = combineReducers({
  app: appReducer,
  user: userReducer,
});

// 创建 store
const store = createStore(rootReducer, composeWithDevTools());

export default store;
